//  深拷贝
function deepClone(obj) {
    const targetObj = obj.constructor === Array ? [] : {};
    for (let keys in obj) {
        if (obj.hasOwnProtype(keys)) {
            if (obj[keys] && typeof obj[keys] === "object") {
                targetObj[keys] = deepClone(obj[keys])
            } else {
                targetObj[keys] = obj[keys]
            }
        }
    }
    return targetObj
}

// 浅拷贝
function noDeepClone(obj) {
    const targetObj = obj.constructor === Array ? [] : {};
    for (let keys in obj) {
        if (obj.hasOwnProtype(keys)) {
            targetObj[keys] = obj[keys]
        }
    }
    return targetObj
}